-- GENERATED SPELL FOR [Forsaken Plaguebringer] --


function spell0_23760(pUnit, Event) --@Kick,n/a--
pUnit:FullCastSpellOnTarget(11978,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23760', 6327, 1)
end

function spell1_23760(pUnit, Event) --@Shoot Plague,n/a--
pUnit:FullCastSpellOnTarget(44005,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23760', 604, 1)
end

function spell2_23760(pUnit, Event) --@Wandering Plague,n/a--
pUnit:FullCastSpellOnTarget(3436,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23760', 2000, 1)
end

function Sorts_23760(pUnit, Event)
local choix_sorts_23760 = math.random(0, 2)
if choix_sorts_23760 == 0 then
pUnit:RegisterEvent('spell0_23760', 1, 1)
end
if choix_sorts_23760 == 1 then
pUnit:RegisterEvent('spell1_23760', 1, 1)
end
if choix_sorts_23760 == 2 then
pUnit:RegisterEvent('spell2_23760', 1, 1)
end
end

function mob23760_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23760', math.random(1500, 3000), 1)
end

function mob23760_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23760_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23760_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23760, 1, 'mob23760_Action')
RegisterUnitEvent(23760, 2, 'mob23760_Leave')
RegisterUnitEvent(23760, 3, 'mob23760_Kill')
RegisterUnitEvent(23760, 4, 'mob23760_Die')
